From d4e3cd63ff3715dbb2835338196911dd0b66429f Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 20 Nov 2009 15:02:10 +0000 Subject: [PATCH] Lowrance USR: strip bogus 0x1 characters for accented placemark names. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3824 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/lowranceusr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gpsbabel/lowranceusr.c b/gpsbabel/lowranceusr.c index aa86be9e0..9fc1a8766 100644 --- a/gpsbabel/lowranceusr.c +++ b/gpsbabel/lowranceusr.c @@ -231,9 +231,17 @@ lowranceusr_readstr(char *buf, const int maxlen, gbfile *file) org = len = gbfgetint32(file); if (len < 0) fatal(MYNAME ": Invalid item length (%d)!\n", len); else if (len) { + int i; if (len > maxlen) len = maxlen; (void) gbfread(buf, 1, len, file); if (org > maxlen) (void) gbfseek(file, org - maxlen, SEEK_CUR); + // IWay 350C puts 0x01 for the accented o in the street name + // of the Montreal Holiday Inn. + for (i = 0; i < len; i++) { + if (buf[i] == 0x01) + buf[i] = '*'; + } + } return len; -- 2.30.2